package com.zxh.system.service.impl;

import com.zxh.system.entity.Role;
import com.zxh.system.repository.BaseRepository;
import com.zxh.system.repository.RoleRepository;
import com.zxh.system.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.Serializable;
import java.util.Optional;

@Service("roleService")
public class RoleServiceImpl extends AbstractBaseServiceImpl<Role> implements RoleService {

    @Autowired
    private RoleRepository roleRepository;

    @Override
    protected BaseRepository getRepository() {
        return roleRepository;
    }

    @Override
    public Optional<Role> get(Serializable id) {
        return get("id",id);
    }
}
